<?php
/*
 File - Config
 Descritpion - This is the basic settings required for the project
 Version - 1.0
*/

error_reporting(E_ALL^E_NOTICE);
set_time_limit(0);
session_start();

$proj_config = array();//this is the master array for the settings

//site name and URL and other details
define('BASEPATH', 'C:\wamp\www\mca\www/');
define('SITEURL', 'http://localhost/mca/www/');
define('DEBUGMODE', true);
define('WEBCODESALT', 'hhFt4775yGhg*-)');
define('MAX_STRLEN_URLS', 60);
define('MAX_SUMMARY_LIMT', 6);
//Page and Data listing constans
define('LIST_DATE_FORMAT', 'jS D M Y');

$proj_config['site_url'] = SITEURL;
$proj_config['project_name'] = 'Web Analytics';

//preg match regular expressions
$proj_config['domain_val'] = '/^[a-zA-Z0-9\._-]+\.[a-zA-Z\.]+$/';

//Set DB details
$db = array();
$db['host'] = 'localhost';
$db['usr'] 	= 'root';
$db['pwd'] 	= '';
$db['db'] 	= 'analytics';
$db['conlink'] 	= false;
$db['persistent'] = true;

//connect to the db using the above details
include_once('db.class.php');
$dbobj = new MySQLDB($db['host'], $db['usr'], $db['pwd'], $db['db'], $db['conlink'], $db['persistent']);

//define tables
define('TBL_USERS' ,'users');
define('TBL_ANA_DATA' ,'analytics_data');
define('TBL_DOMAINS' ,'domains');
define('TBL_TIME_PG' ,'total_time_on_page');

//include necessary files
include_once(BASEPATH.'inc/common_functions.php');
include_once(BASEPATH.'inc/browser_checks.php');

//EOF - config.php
?>